gusucode.com > ASP+ACCESS在线手机销售系统(论文+源代码+答辩PPT) > ASP+ACCESS在线手机销售系统(论文+源代码+答辩PPT)\9)ASP 在线手机销售系统\HandsetPro\handset\admin\proModifySave.asp

    <!-- #include file = "include/sysbase.asp" -->
<%
  Dim strSQL, cmdObj, rsObj
  Dim nID, nProductType, nMemberPrice, nMarketPrice
  nID  =  RealString(Request.Form("id"))
  nProductType  =  Cint(Request.Form("ProductType"))
  nMemberPrice  =  Request.Form("memberPrice")
  nMarketPrice  =  Request.Form("marketPrice")
  if not IsNumeric(nMemberPrice) then nMemberPrice  =  "1"
  if not IsNumeric(nMarketPrice) then nMarketPrice  =  "1"
  
  'response.Write nid
  'response.End 

  Set cmdObj  =  Server.CreateObject("ADODB.Command")
  Set rsObj  =  Server.CreateObject("ADODB.RecordSet")
  cmdObj.CommandType  =  adCmdText
  cmdObj.CommandText  =  "SELECT top 1 * FROM product WHERE id = " & nID
  cmdObj.ActiveConnection  =  conn
  call rsObj.Open(cmdObj, , adOpenKeyset, adLockOptimistic)
  
  rsObj("ProductType")  =  Request.Form("ProductType")
  rsObj("name")  =  Request.Form("name")
  rsObj("memberPrice")  =  nMemberPrice
  rsObj("marketPrice")  =  nMarketPrice
  rsObj("introduce")  =  Request.Form("introduce")
  rsObj("remark")  =  Request.Form("remark")
  rsObj.Update()
  '	   Response.Write rsObj("id")
  '	   Response.End
  '	   rsObj.movelast

       rsObj.Close
	   
       set rsObj = nothing
       CloseConn()
%>
<script language = Javascript>
	<!--
	alert("修改成功!");
	window.location = "<%=Session("adminOldUrl")%>"
	-->
</script>